package com.bw.ivideo.testmvi.model.service

import com.bw.ivideo.testmvi.model.api.Api
import com.bw.ivideo.testmvi.model.entity.VideoEntity
import com.bw.lib_net.RetrofitManager
import com.bw.lib_net.entity.ResponseEntity

/**
 * @Author : ZhouZiYao
 * @Time : On 2023/11/17 19:18
 * @Description :
 */
class VideoService {
    val api: Api by lazy {
        RetrofitManager.instance.createService(Api::class.java)
    }

    suspend fun getVideos(page: Int, pagesize: Int): ResponseEntity<MutableList<VideoEntity>> {
        val videos = api.getVideos(page, pagesize)
        return videos
    }
}